package org.nightknight.satobee.cli;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Scanner;

import java.util.logging.Level;
import java.util.logging.Logger;
import org.nightknight.satobee.core.Contact;
import org.nightknight.satobee.core.Conversation;
import org.nightknight.satobee.core.IMesRecListener;
import org.nightknight.satobee.core.Message;

public class ConversationMain {
/*	
	private Conversation conv;
	private Scanner in = new Scanner(System.in);

	public ConversationMain() {
        try {
            System.out.println("Please input the ip of the computer you want to talk with:");
            String line = null;
            if (in.hasNextLine()) {
                    line = in.nextLine();
            }
            
            conv = new Conversation(new Contact(InetAddress.getByAddress(line.getBytes())));
            conv.addMessageReceivedListener(new IMesRecListener() {

                    @Override
                    public void messageReceived(Message message) {
                            System.out.println(conv.getSocket().getInetAddress().getHostAddress() + ": " + message);
                    }
            });
            
            (new Thread() {
                    public void run() {
                            String line = null;
                            while (in.hasNextLine()) {
                                    line = in.nextLine();
//                                    conv.sendMessage(line);
                            }
                    }
            }).start();
        } catch (UnknownHostException ex) {
            Logger.getLogger(ConversationMain.class.getName()).log(Level.SEVERE, null, ex);
        }
	}
	
	public static void main(String[] args) {
		new ConversationMain();
	}
     * 
     */
}
